<?php


abstract class BaseBreeder extends BaseObject  implements Persistent {


	
	protected static $peer;


	
	protected $id;


	
	protected $name;


	
	protected $achievements;


	
	protected $birthday;


	
	protected $analysis;


	
	protected $contacts;


	
	protected $displays;


	
	protected $picture;


	
	protected $status;


	
	protected $breed;


	
	protected $f;


	
	protected $m;


	
	protected $ff;


	
	protected $fm;


	
	protected $fff;


	
	protected $ffm;


	
	protected $fmf;


	
	protected $fmm;


	
	protected $mf;


	
	protected $mm;


	
	protected $mff;


	
	protected $mfm;


	
	protected $mmf;


	
	protected $mmm;


	
	protected $updated_at;


	
	protected $created_at;

	
	protected $alreadyInSave = false;

	
	protected $alreadyInValidation = false;

	
	public function getId()
	{

		return $this->id;
	}

	
	public function getName()
	{

		return $this->name;
	}

	
	public function getAchievements()
	{

		return $this->achievements;
	}

	
	public function getBirthday($format = 'Y-m-d H:i:s')
	{

		if ($this->birthday === null || $this->birthday === '') {
			return null;
		} elseif (!is_int($this->birthday)) {
						$ts = strtotime($this->birthday);
			if ($ts === -1 || $ts === false) { 				throw new PropelException("Unable to parse value of [birthday] as date/time value: " . var_export($this->birthday, true));
			}
		} else {
			$ts = $this->birthday;
		}
		if ($format === null) {
			return $ts;
		} elseif (strpos($format, '%') !== false) {
			return strftime($format, $ts);
		} else {
			return date($format, $ts);
		}
	}

	
	public function getAnalysis()
	{

		return $this->analysis;
	}

	
	public function getContacts()
	{

		return $this->contacts;
	}

	
	public function getDisplays()
	{

		return $this->displays;
	}

	
	public function getPicture()
	{

		return $this->picture;
	}

	
	public function getStatus()
	{

		return $this->status;
	}

	
	public function getBreed()
	{

		return $this->breed;
	}

	
	public function getF()
	{

		return $this->f;
	}

	
	public function getM()
	{

		return $this->m;
	}

	
	public function getFf()
	{

		return $this->ff;
	}

	
	public function getFm()
	{

		return $this->fm;
	}

	
	public function getFff()
	{

		return $this->fff;
	}

	
	public function getFfm()
	{

		return $this->ffm;
	}

	
	public function getFmf()
	{

		return $this->fmf;
	}

	
	public function getFmm()
	{

		return $this->fmm;
	}

	
	public function getMf()
	{

		return $this->mf;
	}

	
	public function getMm()
	{

		return $this->mm;
	}

	
	public function getMff()
	{

		return $this->mff;
	}

	
	public function getMfm()
	{

		return $this->mfm;
	}

	
	public function getMmf()
	{

		return $this->mmf;
	}

	
	public function getMmm()
	{

		return $this->mmm;
	}

	
	public function getUpdatedAt($format = 'Y-m-d H:i:s')
	{

		if ($this->updated_at === null || $this->updated_at === '') {
			return null;
		} elseif (!is_int($this->updated_at)) {
						$ts = strtotime($this->updated_at);
			if ($ts === -1 || $ts === false) { 				throw new PropelException("Unable to parse value of [updated_at] as date/time value: " . var_export($this->updated_at, true));
			}
		} else {
			$ts = $this->updated_at;
		}
		if ($format === null) {
			return $ts;
		} elseif (strpos($format, '%') !== false) {
			return strftime($format, $ts);
		} else {
			return date($format, $ts);
		}
	}

	
	public function getCreatedAt($format = 'Y-m-d H:i:s')
	{

		if ($this->created_at === null || $this->created_at === '') {
			return null;
		} elseif (!is_int($this->created_at)) {
						$ts = strtotime($this->created_at);
			if ($ts === -1 || $ts === false) { 				throw new PropelException("Unable to parse value of [created_at] as date/time value: " . var_export($this->created_at, true));
			}
		} else {
			$ts = $this->created_at;
		}
		if ($format === null) {
			return $ts;
		} elseif (strpos($format, '%') !== false) {
			return strftime($format, $ts);
		} else {
			return date($format, $ts);
		}
	}

	
	public function setId($v)
	{

						if ($v !== null && !is_int($v) && is_numeric($v)) {
			$v = (int) $v;
		}

		if ($this->id !== $v) {
			$this->id = $v;
			$this->modifiedColumns[] = BreederPeer::ID;
		}

	} 
	
	public function setName($v)
	{

						if ($v !== null && !is_string($v)) {
			$v = (string) $v; 
		}

		if ($this->name !== $v) {
			$this->name = $v;
			$this->modifiedColumns[] = BreederPeer::NAME;
		}

	} 
	
	public function setAchievements($v)
	{

						if ($v !== null && !is_string($v)) {
			$v = (string) $v; 
		}

		if ($this->achievements !== $v) {
			$this->achievements = $v;
			$this->modifiedColumns[] = BreederPeer::ACHIEVEMENTS;
		}

	} 
	
	public function setBirthday($v)
	{

		if ($v !== null && !is_int($v)) {
			$ts = strtotime($v);
			if ($ts === -1 || $ts === false) { 				throw new PropelException("Unable to parse date/time value for [birthday] from input: " . var_export($v, true));
			}
		} else {
			$ts = $v;
		}
		if ($this->birthday !== $ts) {
			$this->birthday = $ts;
			$this->modifiedColumns[] = BreederPeer::BIRTHDAY;
		}

	} 
	
	public function setAnalysis($v)
	{

						if ($v !== null && !is_string($v)) {
			$v = (string) $v; 
		}

		if ($this->analysis !== $v) {
			$this->analysis = $v;
			$this->modifiedColumns[] = BreederPeer::ANALYSIS;
		}

	} 
	
	public function setContacts($v)
	{

						if ($v !== null && !is_string($v)) {
			$v = (string) $v; 
		}

		if ($this->contacts !== $v) {
			$this->contacts = $v;
			$this->modifiedColumns[] = BreederPeer::CONTACTS;
		}

	} 
	
	public function setDisplays($v)
	{

						if ($v !== null && !is_string($v)) {
			$v = (string) $v; 
		}

		if ($this->displays !== $v) {
			$this->displays = $v;
			$this->modifiedColumns[] = BreederPeer::DISPLAYS;
		}

	} 
	
	public function setPicture($v)
	{

						if ($v !== null && !is_int($v) && is_numeric($v)) {
			$v = (int) $v;
		}

		if ($this->picture !== $v) {
			$this->picture = $v;
			$this->modifiedColumns[] = BreederPeer::PICTURE;
		}

	} 
	
	public function setStatus($v)
	{

						if ($v !== null && !is_int($v) && is_numeric($v)) {
			$v = (int) $v;
		}

		if ($this->status !== $v) {
			$this->status = $v;
			$this->modifiedColumns[] = BreederPeer::STATUS;
		}

	} 
	
	public function setBreed($v)
	{

						if ($v !== null && !is_int($v) && is_numeric($v)) {
			$v = (int) $v;
		}

		if ($this->breed !== $v) {
			$this->breed = $v;
			$this->modifiedColumns[] = BreederPeer::BREED;
		}

	} 
	
	public function setF($v)
	{

						if ($v !== null && !is_string($v)) {
			$v = (string) $v; 
		}

		if ($this->f !== $v) {
			$this->f = $v;
			$this->modifiedColumns[] = BreederPeer::F;
		}

	} 
	
	public function setM($v)
	{

						if ($v !== null && !is_string($v)) {
			$v = (string) $v; 
		}

		if ($this->m !== $v) {
			$this->m = $v;
			$this->modifiedColumns[] = BreederPeer::M;
		}

	} 
	
	public function setFf($v)
	{

						if ($v !== null && !is_string($v)) {
			$v = (string) $v; 
		}

		if ($this->ff !== $v) {
			$this->ff = $v;
			$this->modifiedColumns[] = BreederPeer::FF;
		}

	} 
	
	public function setFm($v)
	{

						if ($v !== null && !is_string($v)) {
			$v = (string) $v; 
		}

		if ($this->fm !== $v) {
			$this->fm = $v;
			$this->modifiedColumns[] = BreederPeer::FM;
		}

	} 
	
	public function setFff($v)
	{

						if ($v !== null && !is_string($v)) {
			$v = (string) $v; 
		}

		if ($this->fff !== $v) {
			$this->fff = $v;
			$this->modifiedColumns[] = BreederPeer::FFF;
		}

	} 
	
	public function setFfm($v)
	{

						if ($v !== null && !is_string($v)) {
			$v = (string) $v; 
		}

		if ($this->ffm !== $v) {
			$this->ffm = $v;
			$this->modifiedColumns[] = BreederPeer::FFM;
		}

	} 
	
	public function setFmf($v)
	{

						if ($v !== null && !is_string($v)) {
			$v = (string) $v; 
		}

		if ($this->fmf !== $v) {
			$this->fmf = $v;
			$this->modifiedColumns[] = BreederPeer::FMF;
		}

	} 
	
	public function setFmm($v)
	{

						if ($v !== null && !is_string($v)) {
			$v = (string) $v; 
		}

		if ($this->fmm !== $v) {
			$this->fmm = $v;
			$this->modifiedColumns[] = BreederPeer::FMM;
		}

	} 
	
	public function setMf($v)
	{

						if ($v !== null && !is_string($v)) {
			$v = (string) $v; 
		}

		if ($this->mf !== $v) {
			$this->mf = $v;
			$this->modifiedColumns[] = BreederPeer::MF;
		}

	} 
	
	public function setMm($v)
	{

						if ($v !== null && !is_string($v)) {
			$v = (string) $v; 
		}

		if ($this->mm !== $v) {
			$this->mm = $v;
			$this->modifiedColumns[] = BreederPeer::MM;
		}

	} 
	
	public function setMff($v)
	{

						if ($v !== null && !is_string($v)) {
			$v = (string) $v; 
		}

		if ($this->mff !== $v) {
			$this->mff = $v;
			$this->modifiedColumns[] = BreederPeer::MFF;
		}

	} 
	
	public function setMfm($v)
	{

						if ($v !== null && !is_string($v)) {
			$v = (string) $v; 
		}

		if ($this->mfm !== $v) {
			$this->mfm = $v;
			$this->modifiedColumns[] = BreederPeer::MFM;
		}

	} 
	
	public function setMmf($v)
	{

						if ($v !== null && !is_string($v)) {
			$v = (string) $v; 
		}

		if ($this->mmf !== $v) {
			$this->mmf = $v;
			$this->modifiedColumns[] = BreederPeer::MMF;
		}

	} 
	
	public function setMmm($v)
	{

						if ($v !== null && !is_string($v)) {
			$v = (string) $v; 
		}

		if ($this->mmm !== $v) {
			$this->mmm = $v;
			$this->modifiedColumns[] = BreederPeer::MMM;
		}

	} 
	
	public function setUpdatedAt($v)
	{

		if ($v !== null && !is_int($v)) {
			$ts = strtotime($v);
			if ($ts === -1 || $ts === false) { 				throw new PropelException("Unable to parse date/time value for [updated_at] from input: " . var_export($v, true));
			}
		} else {
			$ts = $v;
		}
		if ($this->updated_at !== $ts) {
			$this->updated_at = $ts;
			$this->modifiedColumns[] = BreederPeer::UPDATED_AT;
		}

	} 
	
	public function setCreatedAt($v)
	{

		if ($v !== null && !is_int($v)) {
			$ts = strtotime($v);
			if ($ts === -1 || $ts === false) { 				throw new PropelException("Unable to parse date/time value for [created_at] from input: " . var_export($v, true));
			}
		} else {
			$ts = $v;
		}
		if ($this->created_at !== $ts) {
			$this->created_at = $ts;
			$this->modifiedColumns[] = BreederPeer::CREATED_AT;
		}

	} 
	
	public function hydrate(ResultSet $rs, $startcol = 1)
	{
		try {

			$this->id = $rs->getInt($startcol + 0);

			$this->name = $rs->getString($startcol + 1);

			$this->achievements = $rs->getString($startcol + 2);

			$this->birthday = $rs->getTimestamp($startcol + 3, null);

			$this->analysis = $rs->getString($startcol + 4);

			$this->contacts = $rs->getString($startcol + 5);

			$this->displays = $rs->getString($startcol + 6);

			$this->picture = $rs->getInt($startcol + 7);

			$this->status = $rs->getInt($startcol + 8);

			$this->breed = $rs->getInt($startcol + 9);

			$this->f = $rs->getString($startcol + 10);

			$this->m = $rs->getString($startcol + 11);

			$this->ff = $rs->getString($startcol + 12);

			$this->fm = $rs->getString($startcol + 13);

			$this->fff = $rs->getString($startcol + 14);

			$this->ffm = $rs->getString($startcol + 15);

			$this->fmf = $rs->getString($startcol + 16);

			$this->fmm = $rs->getString($startcol + 17);

			$this->mf = $rs->getString($startcol + 18);

			$this->mm = $rs->getString($startcol + 19);

			$this->mff = $rs->getString($startcol + 20);

			$this->mfm = $rs->getString($startcol + 21);

			$this->mmf = $rs->getString($startcol + 22);

			$this->mmm = $rs->getString($startcol + 23);

			$this->updated_at = $rs->getTimestamp($startcol + 24, null);

			$this->created_at = $rs->getTimestamp($startcol + 25, null);

			$this->resetModified();

			$this->setNew(false);

						return $startcol + 26; 
		} catch (Exception $e) {
			throw new PropelException("Error populating Breeder object", $e);
		}
	}

	
	public function delete($con = null)
	{
		if ($this->isDeleted()) {
			throw new PropelException("This object has already been deleted.");
		}

		if ($con === null) {
			$con = Propel::getConnection(BreederPeer::DATABASE_NAME);
		}

		try {
			$con->begin();
			BreederPeer::doDelete($this, $con);
			$this->setDeleted(true);
			$con->commit();
		} catch (PropelException $e) {
			$con->rollback();
			throw $e;
		}
	}

	
	public function save($con = null)
	{
    if ($this->isModified() && !$this->isColumnModified(BreederPeer::UPDATED_AT))
    {
      $this->setUpdatedAt(time());
    }

    if ($this->isNew() && !$this->isColumnModified(BreederPeer::CREATED_AT))
    {
      $this->setCreatedAt(time());
    }

		if ($this->isDeleted()) {
			throw new PropelException("You cannot save an object that has been deleted.");
		}

		if ($con === null) {
			$con = Propel::getConnection(BreederPeer::DATABASE_NAME);
		}

		try {
			$con->begin();
			$affectedRows = $this->doSave($con);
			$con->commit();
			return $affectedRows;
		} catch (PropelException $e) {
			$con->rollback();
			throw $e;
		}
	}

	
	protected function doSave($con)
	{
		$affectedRows = 0; 		if (!$this->alreadyInSave) {
			$this->alreadyInSave = true;


						if ($this->isModified()) {
				if ($this->isNew()) {
					$pk = BreederPeer::doInsert($this, $con);
					$affectedRows += 1; 										 										 
					$this->setId($pk);  
					$this->setNew(false);
				} else {
					$affectedRows += BreederPeer::doUpdate($this, $con);
				}
				$this->resetModified(); 			}

			$this->alreadyInSave = false;
		}
		return $affectedRows;
	} 
	
	protected $validationFailures = array();

	
	public function getValidationFailures()
	{
		return $this->validationFailures;
	}

	
	public function validate($columns = null)
	{
		$res = $this->doValidate($columns);
		if ($res === true) {
			$this->validationFailures = array();
			return true;
		} else {
			$this->validationFailures = $res;
			return false;
		}
	}

	
	protected function doValidate($columns = null)
	{
		if (!$this->alreadyInValidation) {
			$this->alreadyInValidation = true;
			$retval = null;

			$failureMap = array();


			if (($retval = BreederPeer::doValidate($this, $columns)) !== true) {
				$failureMap = array_merge($failureMap, $retval);
			}



			$this->alreadyInValidation = false;
		}

		return (!empty($failureMap) ? $failureMap : true);
	}

	
	public function getByName($name, $type = BasePeer::TYPE_PHPNAME)
	{
		$pos = BreederPeer::translateFieldName($name, $type, BasePeer::TYPE_NUM);
		return $this->getByPosition($pos);
	}

	
	public function getByPosition($pos)
	{
		switch($pos) {
			case 0:
				return $this->getId();
				break;
			case 1:
				return $this->getName();
				break;
			case 2:
				return $this->getAchievements();
				break;
			case 3:
				return $this->getBirthday();
				break;
			case 4:
				return $this->getAnalysis();
				break;
			case 5:
				return $this->getContacts();
				break;
			case 6:
				return $this->getDisplays();
				break;
			case 7:
				return $this->getPicture();
				break;
			case 8:
				return $this->getStatus();
				break;
			case 9:
				return $this->getBreed();
				break;
			case 10:
				return $this->getF();
				break;
			case 11:
				return $this->getM();
				break;
			case 12:
				return $this->getFf();
				break;
			case 13:
				return $this->getFm();
				break;
			case 14:
				return $this->getFff();
				break;
			case 15:
				return $this->getFfm();
				break;
			case 16:
				return $this->getFmf();
				break;
			case 17:
				return $this->getFmm();
				break;
			case 18:
				return $this->getMf();
				break;
			case 19:
				return $this->getMm();
				break;
			case 20:
				return $this->getMff();
				break;
			case 21:
				return $this->getMfm();
				break;
			case 22:
				return $this->getMmf();
				break;
			case 23:
				return $this->getMmm();
				break;
			case 24:
				return $this->getUpdatedAt();
				break;
			case 25:
				return $this->getCreatedAt();
				break;
			default:
				return null;
				break;
		} 	}

	
	public function toArray($keyType = BasePeer::TYPE_PHPNAME)
	{
		$keys = BreederPeer::getFieldNames($keyType);
		$result = array(
			$keys[0] => $this->getId(),
			$keys[1] => $this->getName(),
			$keys[2] => $this->getAchievements(),
			$keys[3] => $this->getBirthday(),
			$keys[4] => $this->getAnalysis(),
			$keys[5] => $this->getContacts(),
			$keys[6] => $this->getDisplays(),
			$keys[7] => $this->getPicture(),
			$keys[8] => $this->getStatus(),
			$keys[9] => $this->getBreed(),
			$keys[10] => $this->getF(),
			$keys[11] => $this->getM(),
			$keys[12] => $this->getFf(),
			$keys[13] => $this->getFm(),
			$keys[14] => $this->getFff(),
			$keys[15] => $this->getFfm(),
			$keys[16] => $this->getFmf(),
			$keys[17] => $this->getFmm(),
			$keys[18] => $this->getMf(),
			$keys[19] => $this->getMm(),
			$keys[20] => $this->getMff(),
			$keys[21] => $this->getMfm(),
			$keys[22] => $this->getMmf(),
			$keys[23] => $this->getMmm(),
			$keys[24] => $this->getUpdatedAt(),
			$keys[25] => $this->getCreatedAt(),
		);
		return $result;
	}

	
	public function setByName($name, $value, $type = BasePeer::TYPE_PHPNAME)
	{
		$pos = BreederPeer::translateFieldName($name, $type, BasePeer::TYPE_NUM);
		return $this->setByPosition($pos, $value);
	}

	
	public function setByPosition($pos, $value)
	{
		switch($pos) {
			case 0:
				$this->setId($value);
				break;
			case 1:
				$this->setName($value);
				break;
			case 2:
				$this->setAchievements($value);
				break;
			case 3:
				$this->setBirthday($value);
				break;
			case 4:
				$this->setAnalysis($value);
				break;
			case 5:
				$this->setContacts($value);
				break;
			case 6:
				$this->setDisplays($value);
				break;
			case 7:
				$this->setPicture($value);
				break;
			case 8:
				$this->setStatus($value);
				break;
			case 9:
				$this->setBreed($value);
				break;
			case 10:
				$this->setF($value);
				break;
			case 11:
				$this->setM($value);
				break;
			case 12:
				$this->setFf($value);
				break;
			case 13:
				$this->setFm($value);
				break;
			case 14:
				$this->setFff($value);
				break;
			case 15:
				$this->setFfm($value);
				break;
			case 16:
				$this->setFmf($value);
				break;
			case 17:
				$this->setFmm($value);
				break;
			case 18:
				$this->setMf($value);
				break;
			case 19:
				$this->setMm($value);
				break;
			case 20:
				$this->setMff($value);
				break;
			case 21:
				$this->setMfm($value);
				break;
			case 22:
				$this->setMmf($value);
				break;
			case 23:
				$this->setMmm($value);
				break;
			case 24:
				$this->setUpdatedAt($value);
				break;
			case 25:
				$this->setCreatedAt($value);
				break;
		} 	}

	
	public function fromArray($arr, $keyType = BasePeer::TYPE_PHPNAME)
	{
		$keys = BreederPeer::getFieldNames($keyType);

		if (array_key_exists($keys[0], $arr)) $this->setId($arr[$keys[0]]);
		if (array_key_exists($keys[1], $arr)) $this->setName($arr[$keys[1]]);
		if (array_key_exists($keys[2], $arr)) $this->setAchievements($arr[$keys[2]]);
		if (array_key_exists($keys[3], $arr)) $this->setBirthday($arr[$keys[3]]);
		if (array_key_exists($keys[4], $arr)) $this->setAnalysis($arr[$keys[4]]);
		if (array_key_exists($keys[5], $arr)) $this->setContacts($arr[$keys[5]]);
		if (array_key_exists($keys[6], $arr)) $this->setDisplays($arr[$keys[6]]);
		if (array_key_exists($keys[7], $arr)) $this->setPicture($arr[$keys[7]]);
		if (array_key_exists($keys[8], $arr)) $this->setStatus($arr[$keys[8]]);
		if (array_key_exists($keys[9], $arr)) $this->setBreed($arr[$keys[9]]);
		if (array_key_exists($keys[10], $arr)) $this->setF($arr[$keys[10]]);
		if (array_key_exists($keys[11], $arr)) $this->setM($arr[$keys[11]]);
		if (array_key_exists($keys[12], $arr)) $this->setFf($arr[$keys[12]]);
		if (array_key_exists($keys[13], $arr)) $this->setFm($arr[$keys[13]]);
		if (array_key_exists($keys[14], $arr)) $this->setFff($arr[$keys[14]]);
		if (array_key_exists($keys[15], $arr)) $this->setFfm($arr[$keys[15]]);
		if (array_key_exists($keys[16], $arr)) $this->setFmf($arr[$keys[16]]);
		if (array_key_exists($keys[17], $arr)) $this->setFmm($arr[$keys[17]]);
		if (array_key_exists($keys[18], $arr)) $this->setMf($arr[$keys[18]]);
		if (array_key_exists($keys[19], $arr)) $this->setMm($arr[$keys[19]]);
		if (array_key_exists($keys[20], $arr)) $this->setMff($arr[$keys[20]]);
		if (array_key_exists($keys[21], $arr)) $this->setMfm($arr[$keys[21]]);
		if (array_key_exists($keys[22], $arr)) $this->setMmf($arr[$keys[22]]);
		if (array_key_exists($keys[23], $arr)) $this->setMmm($arr[$keys[23]]);
		if (array_key_exists($keys[24], $arr)) $this->setUpdatedAt($arr[$keys[24]]);
		if (array_key_exists($keys[25], $arr)) $this->setCreatedAt($arr[$keys[25]]);
	}

	
	public function buildCriteria()
	{
		$criteria = new Criteria(BreederPeer::DATABASE_NAME);

		if ($this->isColumnModified(BreederPeer::ID)) $criteria->add(BreederPeer::ID, $this->id);
		if ($this->isColumnModified(BreederPeer::NAME)) $criteria->add(BreederPeer::NAME, $this->name);
		if ($this->isColumnModified(BreederPeer::ACHIEVEMENTS)) $criteria->add(BreederPeer::ACHIEVEMENTS, $this->achievements);
		if ($this->isColumnModified(BreederPeer::BIRTHDAY)) $criteria->add(BreederPeer::BIRTHDAY, $this->birthday);
		if ($this->isColumnModified(BreederPeer::ANALYSIS)) $criteria->add(BreederPeer::ANALYSIS, $this->analysis);
		if ($this->isColumnModified(BreederPeer::CONTACTS)) $criteria->add(BreederPeer::CONTACTS, $this->contacts);
		if ($this->isColumnModified(BreederPeer::DISPLAYS)) $criteria->add(BreederPeer::DISPLAYS, $this->displays);
		if ($this->isColumnModified(BreederPeer::PICTURE)) $criteria->add(BreederPeer::PICTURE, $this->picture);
		if ($this->isColumnModified(BreederPeer::STATUS)) $criteria->add(BreederPeer::STATUS, $this->status);
		if ($this->isColumnModified(BreederPeer::BREED)) $criteria->add(BreederPeer::BREED, $this->breed);
		if ($this->isColumnModified(BreederPeer::F)) $criteria->add(BreederPeer::F, $this->f);
		if ($this->isColumnModified(BreederPeer::M)) $criteria->add(BreederPeer::M, $this->m);
		if ($this->isColumnModified(BreederPeer::FF)) $criteria->add(BreederPeer::FF, $this->ff);
		if ($this->isColumnModified(BreederPeer::FM)) $criteria->add(BreederPeer::FM, $this->fm);
		if ($this->isColumnModified(BreederPeer::FFF)) $criteria->add(BreederPeer::FFF, $this->fff);
		if ($this->isColumnModified(BreederPeer::FFM)) $criteria->add(BreederPeer::FFM, $this->ffm);
		if ($this->isColumnModified(BreederPeer::FMF)) $criteria->add(BreederPeer::FMF, $this->fmf);
		if ($this->isColumnModified(BreederPeer::FMM)) $criteria->add(BreederPeer::FMM, $this->fmm);
		if ($this->isColumnModified(BreederPeer::MF)) $criteria->add(BreederPeer::MF, $this->mf);
		if ($this->isColumnModified(BreederPeer::MM)) $criteria->add(BreederPeer::MM, $this->mm);
		if ($this->isColumnModified(BreederPeer::MFF)) $criteria->add(BreederPeer::MFF, $this->mff);
		if ($this->isColumnModified(BreederPeer::MFM)) $criteria->add(BreederPeer::MFM, $this->mfm);
		if ($this->isColumnModified(BreederPeer::MMF)) $criteria->add(BreederPeer::MMF, $this->mmf);
		if ($this->isColumnModified(BreederPeer::MMM)) $criteria->add(BreederPeer::MMM, $this->mmm);
		if ($this->isColumnModified(BreederPeer::UPDATED_AT)) $criteria->add(BreederPeer::UPDATED_AT, $this->updated_at);
		if ($this->isColumnModified(BreederPeer::CREATED_AT)) $criteria->add(BreederPeer::CREATED_AT, $this->created_at);

		return $criteria;
	}

	
	public function buildPkeyCriteria()
	{
		$criteria = new Criteria(BreederPeer::DATABASE_NAME);

		$criteria->add(BreederPeer::ID, $this->id);

		return $criteria;
	}

	
	public function getPrimaryKey()
	{
		return $this->getId();
	}

	
	public function setPrimaryKey($key)
	{
		$this->setId($key);
	}

	
	public function copyInto($copyObj, $deepCopy = false)
	{

		$copyObj->setName($this->name);

		$copyObj->setAchievements($this->achievements);

		$copyObj->setBirthday($this->birthday);

		$copyObj->setAnalysis($this->analysis);

		$copyObj->setContacts($this->contacts);

		$copyObj->setDisplays($this->displays);

		$copyObj->setPicture($this->picture);

		$copyObj->setStatus($this->status);

		$copyObj->setBreed($this->breed);

		$copyObj->setF($this->f);

		$copyObj->setM($this->m);

		$copyObj->setFf($this->ff);

		$copyObj->setFm($this->fm);

		$copyObj->setFff($this->fff);

		$copyObj->setFfm($this->ffm);

		$copyObj->setFmf($this->fmf);

		$copyObj->setFmm($this->fmm);

		$copyObj->setMf($this->mf);

		$copyObj->setMm($this->mm);

		$copyObj->setMff($this->mff);

		$copyObj->setMfm($this->mfm);

		$copyObj->setMmf($this->mmf);

		$copyObj->setMmm($this->mmm);

		$copyObj->setUpdatedAt($this->updated_at);

		$copyObj->setCreatedAt($this->created_at);


		$copyObj->setNew(true);

		$copyObj->setId(NULL); 
	}

	
	public function copy($deepCopy = false)
	{
				$clazz = get_class($this);
		$copyObj = new $clazz();
		$this->copyInto($copyObj, $deepCopy);
		return $copyObj;
	}

	
	public function getPeer()
	{
		if (self::$peer === null) {
			self::$peer = new BreederPeer();
		}
		return self::$peer;
	}

} 